﻿//*** Guidance generated code ***//
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Web.Http;
using System.Web.Http.Controllers;
using System.Web.Http.Dispatcher;

using ProjectBase.Core;
using ProjectBase.Core.Service;

namespace $safeprojectname$.RestApi
{
    public class ServiceActivator : IHttpControllerActivator
    {
        private readonly HttpConfiguration _configuration;

        #region Constructor
        public ServiceActivator(HttpConfiguration configuration)
        {
            _configuration = configuration;
        }
        #endregion Constructor

        public IHttpController Create(HttpRequestMessage request
            , HttpControllerDescriptor controllerDescriptor, Type controllerType)
        {
            var controller = Factory.CreateInstance(controllerType) as IHttpController;
            return controller;
        }
    }
}
